From: Chad Horohoe Date: Tue, 7 Dec 2010 18:29:04 +0000 (+0000) Subject: Remove various "success" messages from Welcome screen on installer, no need to confus... X-Git-Tag: 1.31.0-rc.0~33473 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=f1166f06d3199aaef21d54d72939d1a77e4802eb;p=lhc%2Fweb%2Fwiklou.git Remove various "success" messages from Welcome screen on installer, no need to confuse the user with extra info :) Now we only show warnings and failures --- diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index a896e8d73e..2834002ff1 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -89,8 +89,6 @@ The following database types are supported: $1. If you are on shared hosting, ask your hosting provider to install a suitable database driver. If you compiled PHP yourself, reconfigure it with a database client enabled, for example using ./configure --with-mysql. If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.', - 'config-have-db' => 'Found database {{PLURAL:$2|driver|drivers}}: $1.', - 'config-have-fts3' => 'SQLite is compiled with the [http://sqlite.org/fts3.html FTS3 module], search features will be available on this backend.', 'config-no-fts3' => "'''Warning''': SQLite is compiled without the [http://sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.", 'config-register-globals' => "'''Warning: PHP's [http://php.net/register_globals register_globals] option is enabled.''' '''Disable it if you can.''' @@ -109,7 +107,6 @@ This option causes horrible bugs with MediaWiki. You cannot install or use MediaWiki unless this option is disabled.", 'config-safe-mode' => "'''Warning:''' PHP's [http://www.php.net/features.safe-mode safe mode] is active. It may cause problems, particularly if using file uploads and math support.", - 'config-xml-good' => 'Have XML / Latin1-UTF-8 conversion support.', 'config-xml-bad' => "PHP's XML module is missing. MediaWiki requires functions in this module and will not work in this configuration. If you're running Mandrake, install the php-xml package.", @@ -117,9 +114,6 @@ If you're running Mandrake, install the php-xml package.", MediaWiki requires the Perl-compatible regular expression functions to work.', 'config-pcre-no-utf8' => "'''Fatal''': PHP's PCRE module seems to be compiled without PCRE_UTF8 support. MediaWiki requires UTF-8 support to function correctly.", - 'config-memory-none' => 'PHP is configured with no memory_limit', - 'config-memory-ok' => "PHP's memory_limit is $1. -OK.", 'config-memory-raised' => "PHP's memory_limit is $1, raised to $2.", 'config-memory-bad' => "'''Warning:''' PHP's memory_limit is $1. This is probably too low. @@ -130,7 +124,6 @@ The installation may fail!", 'config-wincache' => '[http://www.iis.net/download/WinCacheForPhp WinCache] is installed', 'config-no-cache' => "'''Warning:''' Could not find [http://eaccelerator.sourceforge.net eAccelerator], [http://www.php.net/apc APC], [http://trac.lighttpd.net/xcache/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache]. Object caching is not enabled.", - 'config-diff3-good' => 'Found GNU diff3: $1.', 'config-diff3-bad' => 'GNU diff3 not found.', 'config-imagemagick' => 'Found ImageMagick: $1. Image thumbnailing will be enabled if you enable uploads.', @@ -138,13 +131,8 @@ Image thumbnailing will be enabled if you enable uploads.', Image thumbnailing will be enabled if you enable uploads.', 'config-no-scaling' => 'Could not find GD library or ImageMagick. Image thumbnailing will be disabled.', - 'config-dir' => 'Installation directory: $1.', - 'config-uri' => 'Script URI path: $1.', 'config-no-uri' => "'''Error:''' Could not determine the current URI. Installation aborted.", - 'config-file-extension' => 'Installing MediaWiki with $1 file extensions.', - 'config-shell-locale' => 'Detected shell locale "$1"', - 'config-uploads-safe' => 'The default directory for uploads is safe from arbitrary scripts execution.', 'config-uploads-not-safe' => "'''Warning:''' Your default directory for uploads $1 is vulnerable to arbitrary scripts execution. Although MediaWiki checks all uploaded files for security threats, it is highly recommended to [http://www.mediawiki.org/wiki/Manual:Security#Upload_security close this security vulnerability] before enabling uploads.", 'config-brokenlibxml' => 'Your system has a combination of PHP and libxml2 versions which is buggy and can cause hidden data corruption in MediaWiki and other web applications. diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 80e8974890..baab522374 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -388,16 +388,13 @@ abstract class Installer { return false; } - $this->showMessage( 'config-have-db', $wgLang->listToText( $goodNames ), count( $goodNames ) ); - // Check for FTS3 full-text search module $sqlite = $this->getDBInstaller( 'sqlite' ); if ( $sqlite->isCompiled() ) { $db = new DatabaseSqliteStandalone( ':memory:' ); - $this->showMessage( $db->getFulltextSearchModule() == 'FTS3' - ? 'config-have-fts3' - : 'config-no-fts3' - ); + if( $db->getFulltextSearchModule() == 'FTS3' ) { + $this->showMessage( 'config-no-fts3' ); + } } } @@ -492,7 +489,6 @@ abstract class Installer { $this->showMessage( 'config-xml-bad' ); return false; } - $this->showMessage( 'config-xml-good' ); } /** @@ -519,7 +515,6 @@ abstract class Installer { $limit = ini_get( 'memory_limit' ); if ( !$limit || $limit == -1 ) { - $this->showMessage( 'config-memory-none' ); return true; } @@ -539,7 +534,7 @@ abstract class Installer { $this->setVar( '_RaiseMemory', true ); } } else { - $this->showMessage( 'config-memory-ok', $limit ); + return true; } } @@ -547,12 +542,10 @@ abstract class Installer { * Environment check for compiled object cache types. */ protected function envCheckCache() { - $caches = array(); - + $caches = false; foreach ( $this->objectCaches as $name => $function ) { if ( function_exists( $function ) ) { $caches[$name] = true; - $this->showMessage( 'config-' . $name ); } } @@ -573,7 +566,6 @@ abstract class Installer { $diff3 = $this->locateExecutableInDefaultPaths( $names, $versionInfo ); if ( $diff3 ) { - $this->showMessage( 'config-diff3-good', $diff3 ); $this->setVar( 'wgDiff3', $diff3 ); } else { $this->setVar( 'wgDiff3', false ); @@ -608,7 +600,6 @@ abstract class Installer { $IP = dirname( dirname( dirname( __FILE__ ) ) ); $this->setVar( 'IP', $IP ); - $this->showMessage( 'config-dir', $IP ); // PHP_SELF isn't available sometimes, such as when PHP is CGI but // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME @@ -627,7 +618,6 @@ abstract class Installer { $uri = preg_replace( '{^(.*)/config.*$}', '$1', $path ); $this->setVar( 'wgScriptPath', $uri ); - $this->showMessage( 'config-uri', $uri ); } /** @@ -640,9 +630,7 @@ abstract class Installer { } else { $ext = 'php'; } - $this->setVar( 'wgScriptExtension', ".$ext" ); - $this->showMessage( 'config-file-extension', $ext ); } /** @@ -686,7 +674,6 @@ abstract class Installer { # Try the current value of LANG. if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) { $this->setVar( 'wgShellLocale', getenv( 'LANG' ) ); - $this->showMessage( 'config-shell-locale', getenv( 'LANG' ) ); return true; } @@ -695,7 +682,6 @@ abstract class Installer { foreach ( $commonLocales as $commonLocale ) { if ( isset( $candidatesByLocale[$commonLocale] ) ) { $this->setVar( 'wgShellLocale', $commonLocale ); - $this->showMessage( 'config-shell-locale', $commonLocale ); return true; } } @@ -706,7 +692,6 @@ abstract class Installer { if ( isset( $candidatesByLang[$wikiLang] ) ) { $m = reset( $candidatesByLang[$wikiLang] ); $this->setVar( 'wgShellLocale', $m[0] ); - $this->showMessage( 'config-shell-locale', $m[0] ); return true; } @@ -714,7 +699,6 @@ abstract class Installer { if ( count( $candidatesByLocale ) ) { $m = reset( $candidatesByLocale ); $this->setVar( 'wgShellLocale', $m[0] ); - $this->showMessage( 'config-shell-locale', $m[0] ); return true; } @@ -733,7 +717,7 @@ abstract class Installer { $safe = !$this->dirIsExecutable( $dir, $url ); if ( $safe ) { - $this->showMessage( 'config-uploads-safe' ); + return true; } else { $this->showMessage( 'config-uploads-not-safe', $dir ); }